//
//  AudioVideoListCell.m
//  TrainTree
//
//  Created by wanghui on 2017/9/17.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "AudioVideoListCell.h"

@implementation AudioVideoListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.icon.layer.cornerRadius = 3.0f;
    self.icon.layer.masksToBounds = YES;
    self.icon.layer.borderWidth = 1.0f;
    self.icon.layer.borderColor = [UIColor colorWithRed:216.0f / 255.0f green:216.0f / 255.0f blue:216.0f / 255.0f alpha:1.0].CGColor;

}
- (void)configWithPointModel:(PointModel *)model
{
    [self.icon sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",TrainTreeFileImgURL,model.pointCover]] placeholderImage:ImageNamed(@"ty_pic")];
    self.pointdesc.text = model.pointDesc;
    self.title.text = model.pointName;

//    NSString *str_minute = [NSString stringWithFormat:@"%02ld",([model.pointVideoTime integerValue] % 3600)/60];
        //format of second
//    NSString *str_second = [NSString stringWithFormat:@"%02ld",[model.pointVideoTime integerValue] % 60];
    self.time.text = [TimeTool convertTimeFromSeconds:model.pointVideoTime];

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
